define(function () {
    'use strict';

    function ctrl($scope, $state, CommonService, LocalCacheService) {
        function init() {
            $scope.repay = {
                money: 234300.00
            };
            $scope.loan = {
                date: new Date(),
                money: 234300.00,
                time: 28,
                rate: 0.004,
                interest: 232.21
            };
            $scope.account = {
                balance: 300000.00
            }
        }

        $scope.$on('$ionicView.loaded', function () {
            init();
        });

        $scope.submit = function () {
            //提交还款逻辑，成功后返回
            CommonService.showComplete('../view/template/repaymenttemplate.html', '返回', 'tab.account-easyFinancingRepayment');
        }
    }

    ctrl.$inject = ['$scope', '$state', 'CommonService', 'LocalCacheService'];
    return ctrl;
});
